#pragma once

#include <QWidget>
#include "ui_MessageChatBox.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MessageChatBoxClass; };
QT_END_NAMESPACE

class MessageChatBox : public QWidget
{
    Q_OBJECT

public:
    MessageChatBox(QWidget *parent = nullptr);
    ~MessageChatBox() override;
    
    // 设置消息内容
    void setMessage(const QString& username, const QString& message, const QString& timestamp = "");
    void setSystemMessage(const QString& message, const QString& timestamp = "");
    
    // 设置消息样式
    void setMessageStyle(const QString& usernameColor = "#333333", 
                        const QString& messageColor = "#000000",
                        const QString& timestampColor = "#666666");

private:
    Ui::MessageChatBoxClass *ui;
};

